package cn.frh.product.controller;

import cn.frh.product.domain.ProductDetail;
import cn.frh.product.service.IProductDetailService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/productDetail")
public class ProductDetailController {
    @Autowired
    private IProductDetailService productDetailService;

    @GetMapping("/{id}")
    public ProductDetail getProductDetail(@PathVariable("id")Long id){
        return productDetailService.queryById(id);
    }
}
